package com.wing.bill.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import com.wing.purchase.model.entity.SupplierInfo;
import com.wing.purchase.model.response.PurchaseSignForVO;
import com.wing.purchase.model.response.SupplierInfoVO;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 采购账单
 *
 * @author xiayang
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("pur_purchase_bill")
public class PurchaseBill extends BaseEntity<PurchaseBill> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 账单编码
     */
    private String code;

    /**
     * 供应商ID
     */
    private Long supplierId;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String supplierName;

    /**
     * 账单开始时间
     */
    private String billStartTime;

    /**
     * 账单结束时间
     */
    private String billEndTime;

    /**
     * 签收单数
     */
    private Integer signOrderNum;

    /**
     * 采购订单数
     */
    private Integer purchaseOrderNum;

    /**
     * 账单金额
     */
    private BigDecimal billSum;

    /**
     * 结算状态
     */
    private String settleStatus;

    /**
     * 结算状态名称
     */
    @TableField(exist = false)
    private String settleStatusName;

    /**
     * 发票状态
     */
    private String receiptStatus;

    /**
     * 发票状态名称
     */
    @TableField(exist = false)
    private String receiptStatusName;

    /**
     * 所属年月
     */
    @TableField(exist = false)
    private String billDate;

    /**
     * 结算记录列表
     */
    @TableField(exist = false)
    private List<PurchaseBillSettle> settleList;

    /**
     * 开票记录列表
     */
    @TableField(exist = false)
    private List<PurchaseBillReceipt> receiptList;

    /**
     * 签收记录列表
     */
    @TableField(exist = false)
    private List<PurchaseSignForVO> signList;

    /**
     * 供应商信息
     */
    @TableField(exist = false)
    private SupplierInfoVO supplierInfo;
}
